
<div class="v_nav">
	<div class="vf_nav">
		<ul>

			<li> <a href="{:U('Mobile/Index/index')}" <if condition="$navid eq 'home'">class="act"</if> >
			    <i class="icon iconfont icon-shouye"></i>
			    <span>首页</span></a></li>

           	<php>if($_SESSION[is_coach]!=1){</php>
                <li><a href="{:U('Goods/categoryList')}" <if condition="$navid eq 'shop'">class="act"</if> >
                    <i class="icon iconfont icon-paobu fontbao"></i>
                    <span>商城</span></a></li>
                    
                <li><a href="{:U('Coach/coach_list')}" <if condition="$navid eq 'coach'">class="act"</if> >
                    <i class="icon iconfont icon-juzhong"></i>
                    <span>教练</span></a></li>
                <li><a href="{:U('Cart/cart')}" <if condition="$navid eq 'cart'">class="act"</if> >
                    <i class="icon iconfont icon-gouwuche fontshop"></i>
                    <span>购物车</span></a></li>
            <php>}</php>
           
			<!--<li>-->
			<!--<a href="{:U('Cart/cart')}">-->
			   <!--<em class="global-nav__nav-shop-cart-num" id="cart_quantity" style="right:9px;"></em>-->
			   <!--<i class="vf_4"></i>-->
			   <!--<span>购物车</span>-->
			   <!--</a>-->
			<!--</li>-->
			<php>if($_SESSION['is_coach']){</php>
			<li><a href="{:U('Yuyue/coach_detail')}" <if condition="$navid eq 'yuyue'">class="act"</if> >
			    <i class="icon iconfont icon-calendar"></i>
				<span>预约</span></a>
			</li>
			<php>}else{</php>
			<li style="display:none;"><a href="{:U('Yuyue/coach_list')}" <if condition="$navid eq 'yuyue'">class="act"</if>  >
			    <i class="icon iconfont icon-calendar"></i>
				<span>预约</span></a>
			</li>
			<php>}</php>


			<!--<li><a href="{:U('Yuyue/coach_list')}">-->
				<!--<i class="vf_5"></i>-->
				<!--<span>预约</span></a>-->
			<!--</li>-->
			<li><a href="{:U('User/index')}" <if condition="$navid eq 'user'">class="act"</if>>
			    <i class="icon iconfont icon-gerenzhongxin"></i>
			    <span>我的</span></a>
			</li>
		</ul>
	</div>
</div> 
<script type="text/javascript">
$(document).ready(function(){
	  var cart_cn = getCookie('cn');
	  if(cart_cn == ''){
		$.ajax({
			type : "GET",
			url:"/index.php?m=Home&c=Cart&a=header_cart_list",//+tab,
			success: function(data){								 
				cart_cn = getCookie('cn');
				$('#cart_quantity').html(cart_cn);						
			}
		});	
	  }
	  $('#cart_quantity').html(cart_cn);
});
</script>

<if condition="$_GET[act] eq 1" >
<script>
    XBack = {};

    (function(XBack) {
        XBack.STATE = 'x - back';
        XBack.element;

        XBack.onPopState = function(event) {
            event.state === XBack.STATE && XBack.fire();
            XBack.record(XBack.STATE); //初始化事件时，push一下
        };

        XBack.record = function(state) {
            history.pushState(state, null, location.href);
        };

        XBack.fire = function() {
            var event = document.createEvent('Events');
            event.initEvent(XBack.STATE, false, false);
            XBack.element.dispatchEvent(event);
        };

        XBack.listen = function(listener) {
            XBack.element.addEventListener(XBack.STATE, listener, false);
        };

        XBack.init = function() {
            XBack.element = document.createElement('span');
            window.addEventListener('popstate', XBack.onPopState);
            XBack.record(XBack.STATE);
        };

    })(XBack); // 引入这段js文件

    XBack.init();
    XBack.listen(function() {});
</script>
</if>
<!-- 微信浏览器 调用微信 分享js-->
<if condition="$signPackage neq null">
	<include file="Public/wx_share"/>
</if>
<!-- 微信浏览器 调用微信 分享js  end-->